﻿<dxr:DXRibbonWindow x:Class="ThanNhanTao.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:ConvertCustom"
		xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
		xmlns:dxr="http://schemas.devexpress.com/winfx/2008/xaml/ribbon"
		xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars"
		xmlns:dxbh="http://schemas.devexpress.com/winfx/2008/xaml/bars/internal"
		xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
		xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:common="clr-namespace:ThanNhanTao.CommonControl"
        xmlns:uc="clr-namespace:ThanNhanTao.UC"
        Title="Khoa thận nhân tạo" Loaded="DXRibbonWindow_Loaded"
        dx:ThemeManager.ThemeName="Office2007Blue" Topmost="False" Icon="/ThanNhanTao;component/Images/iconbv48x48.ico" WindowState="Maximized">
    <dxb:BarManager dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" ItemClick="BarManager_ItemClick">
        <dxb:BarManager.Items>
            <dxb:BarEditItem x:Name="dteNgayLamViec" EditHeight="60"
                             EditValueChanged="dteNgayLamViec_EditValueChanged">
                <dxb:BarEditItem.EditStyle>
                    <Style TargetType="dxe:DateEdit">
                        <Setter Property="FontSize" Value="16" />
                        <Setter Property="FontWeight" Value="Bold" />
                    </Style>
                </dxb:BarEditItem.EditStyle>
                <dxb:BarEditItem.EditSettings>
                    <dxe:DateEditSettings x:Name="dteNgayLamViecChon" HorizontalContentAlignment="Center" CharacterCasing="Upper"
                                          DisplayFormat="dd/MM/yyyy" Mask="dd/MM/yyyy" MaskCulture="vi-VN">
                    </dxe:DateEditSettings>
                </dxb:BarEditItem.EditSettings>
            </dxb:BarEditItem>
            <dxb:BarEditItem x:Name="staticItemThongTinChung"> 
                <!--<dxb:BarEditItem.EditStyle>
                    <Style TargetType="dxe:TextEdit">
                        <Setter Property="Foreground" Value="Red"/>
                        <Setter Property="FontSize" Value="22" />
                        <Setter Property="Background" Value="Transparent" />
                        <Setter Property="BorderBrush" Value="Transparent" />
                        <Setter Property="FontWeight" Value="Bold" />
                        <Setter Property="IsReadOnly" Value="True" />
                    </Style>
                </dxb:BarEditItem.EditStyle>
                <dxb:BarEditItem.EditSettings>
                    <dxe:TextEditSettings IsEnabled="False"/>
                </dxb:BarEditItem.EditSettings>-->
                <dxb:BarEditItem.ContentTemplate>
                    <DataTemplate>
                        <uc:ucThongKeBenhAnMainForm x:Name="ucThongKeBenhAnBenhNhan"></uc:ucThongKeBenhAnMainForm>
                    </DataTemplate>
                </dxb:BarEditItem.ContentTemplate>
            </dxb:BarEditItem>
            <dxb:BarEditItem Name="tnThongBao" Content="">
            </dxb:BarEditItem>
            <dxb:BarButtonItem x:Name="btnThemMoi" Content="Thêm mới" Glyph="Images/Icons/nhan_bn_cap_cuu.png" LargeGlyph="Images/Icons/nhan_bn_cap_cuu.png" />
            <dxb:BarButtonItem x:Name="btnPhieuNgoaiTru" Content="Phiếu nội trú" Glyph="Images/Icons/benh_an_ngoai_khoa.png" LargeGlyph="Images/Icons/benh_an_ngoai_khoa.png" />
            <dxb:BarButtonItem x:Name="btnPhieuNoiTru" Content="Phiếu ngoại trú" Glyph="Images/Icons/benh_an_noi_khoa.png" LargeGlyph="Images/Icons/benh_an_noi_khoa.png" />
            <dxb:BarButtonItem x:Name="btnPhieuChayThan" Content="Phiếu chạy thận" Glyph="Images/Icons/phieuChayThan.png" LargeGlyph="Images/Icons/phieucThan.png" />
            <dxb:BarButtonItem x:Name="btnTimKiem" Content="Tìm kiếm" Glyph="Images/Icons/zoom-16x16.png" LargeGlyph="Images/Icons/zoom-32x32.png" />
            <dxb:BarButtonItem x:Name="btnRefresh" Content="Refresh" Glyph="Images/Icons/Refresh16.png" LargeGlyph="Images/Icons/Refresh32.png" />
            <dxb:BarButtonItem x:Name="btnThoat" Content="Thoát" Glyph="Images/Icons/close-16x16.png" LargeGlyph="Images/Icons/close-32x32.png"/>
            <dxb:BarButtonItem x:Name="btnAbout" Content="Giới thiệu" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnDmYeuCau" Content="Yêu cầu" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnDmLoaiYeuCau" Content="Loại yêu cầu" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnDmNgheNghiep" Content="Nghề nghiệp" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnDmChanDoan" Content="Chẩn đoán" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />

            <dxb:BarButtonItem x:Name="btnThongKeTongSoLanChay" Content="Tổng số lần chạy" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongKeTenVaTongBenhNhan" Content="Thống kê bệnh nhân chạy thận" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongKeBNDungThuoc" Content="Bệnh nhân dùng thuốc" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongKeBenhNhan" Content="Thống kê bệnh nhân" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongKeDanhSachDeNghiThanhToanNgoaiTruMau25A" Content="Đề Nghị Thanh Toán Ngoại trú - Mẫu 25A" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongKeBenhNhanRaVaoKhoa" Content="Thống kê bệnh nhân ra vào Khoa" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnCauHinhHanBHYT" Content="Cấu hình Hạn BHYT" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnSaoLuuPhucHoiDuLieu" Content="Sao lưu phục hồi dữ liệu" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThongBaoHanBHYT" Content="Thông báo hạn BHYT" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnCauHinhConnectSQL" Content="Kết nối dữ liệu" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            
            <dxb:BarButtonItem x:Name="btnInPhieuThongTinNhanSu" Content="In thông tin hồ sơ" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
            <dxb:BarButtonItem x:Name="btnThemNhanSu" Content="Quản lý nhân sự" Glyph="Images/Icons/xuat_vien.png" LargeGlyph="Images/Icons/xuat_vien.png" />
        </dxb:BarManager.Items>
        <DockPanel>
            <dxr:RibbonControl x:Name="ribbonControl1" RibbonStyle="Office2010" dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" DockPanel.Dock="Top" ToolbarShowMode="Hide" ToolbarShowCustomizationButton="False" AllowMinimizeRibbon="True" AllowDrop="False" ApplicationButtonSmallIcon="/ThanNhanTao;component/Images/iconbv48x48.ico">
                <dxr:RibbonControl.ApplicationMenu>
                    <dxr:ApplicationMenuInfo >
                    </dxr:ApplicationMenuInfo>
                </dxr:RibbonControl.ApplicationMenu>

                <dxr:RibbonDefaultPageCategory>
                    <dxr:RibbonPage Name="qlBenhNhan" Caption="Quản lý bệnh nhân">
                        <dxr:RibbonPageGroup Caption="Bệnh nhân">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnThemMoi"/>
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarButtonItemLink BarItemName="btnTimKiem"/>
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarButtonItemLink BarItemName="btnRefresh"/>
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Phiếu thanh toán">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnPhieuNgoaiTru"/>
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarButtonItemLink BarItemName="btnPhieuNoiTru"/>
                                <dxb:BarItemLinkSeparator />
                                <dxb:BarButtonItemLink BarItemName="btnPhieuChayThan"/>
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Ngày làm việc">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarEditItemLink BarItemName="dteNgayLamViec"/>
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Thông tin chung tại khoa" >
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarEditItemLink BarItemName="staticItemThongTinChung"/>
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Exit">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnThoat"/>
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="danhMucGroup" Caption="Quản lý danh mục">
                        <dxr:RibbonPageGroup Caption="Quản lý danh mục">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnDmYeuCau" />
                                <dxb:BarButtonItemLink BarItemName="btnDmLoaiYeuCau" />
                                <dxb:BarButtonItemLink BarItemName="btnDmNgheNghiep" />
                                <dxb:BarButtonItemLink BarItemName="btnDmChanDoan" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="thongKeBaoCao" Caption="Thống kê">
                        <dxr:RibbonPageGroup Caption="Chạy thận">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnThongKeTongSoLanChay" />
                                <dxb:BarButtonItemLink BarItemName="btnThongKeTenVaTongBenhNhan" />
                                <dxb:BarButtonItemLink BarItemName="btnThongKeBNDungThuoc" />
                                <dxb:BarButtonItemLink BarItemName="btnThongKeBenhNhan" />
                                <dxb:BarButtonItemLink BarItemName="btnThongKeDanhSachDeNghiThanhToanNgoaiTruMau25A" />
                                <dxb:BarButtonItemLink BarItemName="btnThongKeBenhNhanRaVaoKhoa" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="thongTinCauHinhGroup" Caption="Cấu hình">
                        <dxr:RibbonPageGroup Caption="Cấu hình hạn BHYT">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnCauHinhHanBHYT" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Kết nối dữ liệu">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnCauHinhConnectSQL" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Hệ thống">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnSaoLuuPhucHoiDuLieu" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="btnNhanSuKhoa" Caption="Nhân sự Khoa">
                        <dxr:RibbonPageGroup Caption="In phiếu">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnInPhieuThongTinNhanSu" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Quản lý nhân sự">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnThemNhanSu" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                    <dxr:RibbonPage Name="thongTinSanPhamGroup" Caption="Thông tin">
                        <dxr:RibbonPageGroup Caption="Thông tin sản phẩm">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnAbout" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                        <dxr:RibbonPageGroup Caption="Thông báo BHYT">
                            <dxr:RibbonPageGroup.ItemLinks>
                                <dxb:BarButtonItemLink BarItemName="btnThongBaoHanBHYT" />
                            </dxr:RibbonPageGroup.ItemLinks>
                        </dxr:RibbonPageGroup>
                    </dxr:RibbonPage>
                </dxr:RibbonDefaultPageCategory>
            </dxr:RibbonControl>
            <dxr:RibbonStatusBarControl dxbh:BlendHelperForBarsAndRibbon.IsDesignControl="true" DockPanel.Dock="Bottom">
                <dxr:RibbonStatusBarControl.LeftItemLinks>
                    <dxb:BarEditItemLink BarItemName="tnThongBao" />
                </dxr:RibbonStatusBarControl.LeftItemLinks>
            </dxr:RibbonStatusBarControl>
            <Grid >
                <Grid.ColumnDefinitions>

                    <ColumnDefinition Width="3*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="2*" MinHeight="3" />
                </Grid.RowDefinitions>

                <dxg:GridControl  Grid.Column="1" Grid.Row="0" Name="GridBenhNhan" MouseDoubleClick="GridBenhNhan_MouseDoubleClick">
                    <dxg:GridControl.Resources>
                        <ControlTemplate x:Key="editTemplate">
                            <StackPanel Orientation="Horizontal">
                                <!--<Image x:Name="daPrintDong" HorizontalAlignment="Left" Visibility="Hidden" Width="16" Height="16" Source="/ThanNhanTao;component/Images/Icons/print-16x16.png"></Image>-->
                                <TextBlock x:Name="PART_Editor"/>
                            </StackPanel>
                            <ControlTemplate.Triggers>
                                <DataTrigger Binding="{Binding Data.MLTPE2000}" Value="YES">
                                    <Setter Property="FontWeight" Value="Bold" TargetName="PART_Editor" />
                                    <!--<Setter Property="Visibility" Value="Visible" TargetName="daPrintDong" />-->
                                </DataTrigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </dxg:GridControl.Resources>
                    <dxg:GridControl.Columns>
                        <dxg:GridColumn Name="cluIdBenhNhan" Header="IdBenhNhan" FieldName="IdBenhNhan" Visible="False"/>
                        <dxg:GridColumn Name="cluSTT" Header="STT" Width="50" AllowEditing="False">
                            <dxg:GridColumn.DisplayTemplate>
                                <ControlTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Image x:Name="daPrint" HorizontalAlignment="Left" Visibility="Hidden" Width="16" Height="16" Source="/ThanNhanTao;component/Images/Icons/print-16x16.png"></Image>
                                        <dxe:TextEdit x:Name="thayDoiSTT" Text="{Binding Path =Data.RowHandle.Value,Converter ={local:RowHandleToStringConverter},Mode =OneWay}" HorizontalAlignment="Center" EditMode="InplaceActive" />
                                    </StackPanel>
                                    <ControlTemplate.Triggers>
                                        <DataTrigger Binding="{Binding Data.MLTPE2000}" Value="YES">
                                            <Setter Property="FontWeight" Value="Bold" TargetName="thayDoiSTT" />
                                            <!--<Setter Property="Foreground" Value="Red" TargetName="thayDoiSTT" />-->
                                            <Setter Property="Visibility" Value="Visible" TargetName="daPrint" />
                                        </DataTrigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </dxg:GridColumn.DisplayTemplate>
                        </dxg:GridColumn>
                        <dxg:GridColumn Name="cluMaNhapVien" Header="Mã NV" FieldName="SoNhapVien" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="60"
                                        AutoFilterCondition="Contains"/>
                        <dxg:GridColumn Name="cluHo" Header="Họ" FieldName="Ho" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}"/>
                        <dxg:GridColumn Name="cluTen" Header="Tên" FieldName="Ten" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="60"/>
                        <dxg:GridColumn Name="cluTuoi" Header="Tuổi" FieldName="Tuoi" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="50"/>
                        <dxg:GridColumn FieldName="GioiTinh" Header="Giới tính" ReadOnly="True" Width="50">
                            <dxg:GridColumn.CellTemplate>
                                <DataTemplate>
                                    <dxe:TextEdit Text="{Binding Value, Converter={common:GioiTinhConverterToString}}" HorizontalAlignment="Left" EditMode="InplaceInactive" />
                                </DataTemplate>
                            </dxg:GridColumn.CellTemplate>
                        </dxg:GridColumn>
                        <dxg:GridColumn Name="cluSoBHYT" Header="Số BHYT" FieldName="SoBHYT" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="125" AutoFilterCondition="Contains"/>
                        <dxg:GridColumn Name="cluNgayVao" Header="Ngày vào" FieldName="NgayVaoVien" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="70">
                            <dxg:GridColumn.EditSettings>
                                <dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" Mask="dd/MM/yyyy" MaskCulture="vi-VN" HorizontalContentAlignment="Center"/>
                            </dxg:GridColumn.EditSettings>
                        </dxg:GridColumn>
                        <dxg:GridColumn Name="cluNgayRa" Header="Ngày ra" FieldName="NgayRaVien" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="70">
                            <dxg:GridColumn.EditSettings>
                                <dxe:DateEditSettings DisplayFormat="dd/MM/yyyy" Mask="dd/MM/yyyy" MaskCulture="vi-VN" HorizontalContentAlignment="Center"/>
                            </dxg:GridColumn.EditSettings>
                        </dxg:GridColumn>
                        <dxg:GridColumn Name="colTrangThaiDieuTri" Header="Trạng thái" FieldName="TrangThaiDieuTri" AllowEditing="False" 
                                        DisplayTemplate="{StaticResource editTemplate}" Width="80"/>
                        <!--<dxg:GridColumn Name="cluTuVong" Header="Tử vong" FieldName="TinhHinhTuVong" AllowEditing="False" Width="60">
                            <dxg:GridColumn.DisplayTemplate>
                                <ControlTemplate>
                                    <dxe:TextEdit IsReadOnly="True" Text="{Binding Path =Data.TinhHinhTuVong,Converter ={local:BooleanConverterTV},Mode =OneWay}" HorizontalAlignment="Center" EditMode="InplaceActive" />
                                </ControlTemplate>
                            </dxg:GridColumn.DisplayTemplate>
                        </dxg:GridColumn>-->
                        <dxg:GridColumn Name="cluTinhHinhTuVong" Header="Tử vong" FieldName="TextTinhHinhTuVong" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="80" AutoFilterCondition="Contains"/>
                        <!--<dxg:GridColumn Name="cluXinVe" FieldName="TinhHinhTuVong" Header="Xin về" AllowEditing="False" Visible="False">
                            <dxg:GridColumn.DisplayTemplate>
                                <ControlTemplate>
                                    <dxe:CheckEdit IsReadOnly="True" IsChecked="{Binding Path =Data.TinhHinhTuVong,Converter ={local:BooleanConverterXV},Mode =OneWay}" HorizontalAlignment="Left" EditMode="InplaceActive" />
                                </ControlTemplate>
                            </dxg:GridColumn.DisplayTemplate>
                        </dxg:GridColumn>-->
                        <dxg:GridColumn Name="cluChuanDoan" Header="Chẩn đoán" FieldName="Dm_ChanDoan.TenChanDoan" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="150"/>
                        <dxg:GridColumn Name="cluMaBenh" Header="Mã bệnh" FieldName="Dm_ChanDoan.MaChanDoan" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="70"/>
                        <dxg:GridColumn Name="cluKhuVuc" Header="Khu vực" FieldName="MLPrismaflex" AllowEditing="False" DisplayTemplate="{StaticResource editTemplate}" Width="65"/>
                    </dxg:GridControl.Columns>
                    <dxg:GridControl.TotalSummary>
                        <dxg:GridSummaryItem FieldName="Ho" SummaryType="Count" DisplayFormat=" {0:n0} bệnh nhân"/>
                        <!--<dxg:GridSummaryItem FieldName="SLThuocDung" SummaryType="Sum" DisplayFormat=" Tổng SL: {0:n0} "/>-->
                    </dxg:GridControl.TotalSummary>
                    <dxg:GridControl.View>
                        <dxg:TableView ShowAutoFilterRow="True" MaxHeight="1800" NavigationStyle="Row"
                                           ShowGroupedColumns="False" ShowColumnHeaders="True" 
                                           ShowGroupPanel="False" AutoWidth="True" AllowEditing="False" 
                                           AllowDrop="False" AllowGrouping="False" AllowMoveColumnToDropArea="False" 
                                           AllowMoving="False" IsColumnMenuEnabled="False" IsDeferredScrolling="False" 
                                           IsGroupPanelMenuEnabled="False" IsRowCellMenuEnabled="True"
                                           IsTotalSummaryMenuEnabled="False" MultiSelectMode="Row" ShowTotalSummary="True"
                                           ShowFilterPopup="TableView_ShowFilterPopup"
                                           ShowGridMenu="TableView_ShowGridMenu"    
                                       >
                            <!--<dxg:TableView.RowCellMenuCustomizations>
                                <dxb:BarButtonItem Name="BarButtonItemPhieuChayThan" Content="Chạy thận" ItemClick="BarButtonItemPhieuChayThan_ItemClick" IsVisible="False"/>
                                <dxb:BarButtonItem Name="BarButtonItemPhieuChayThanNoiTruUyBan" Content="Nội trú ủy ban" ItemClick="BarButtonItemPhieuChayThanNoiTruUyBan_ItemClick"/>
                                <dxb:BarButtonItem Name="BarButtonItemPhieuChayThanNoiTruGopVon" Content="Nội trú góp vốn" ItemClick="BarButtonItemPhieuChayThanNoiTruGopVon_ItemClick"/>
                                <dxb:BarButtonItem Name="BarButtonItemPhieuChayNgoaiTruUyBan" Content="Ngoại trú ủy ban" ItemClick="BarButtonItemPhieuChayNgoaiTruUyBan_ItemClick"/>
                                <dxb:BarButtonItem Name="BarButtonItemPhieuChayNgoaiTruGopVon" Content="Ngoại trú góp vốn" ItemClick="BarButtonItemPhieuChayNgoaiTruGopVon_ItemClick"/>
                            </dxg:TableView.RowCellMenuCustomizations>-->
                        </dxg:TableView>
                    </dxg:GridControl.View>
                </dxg:GridControl>

            </Grid>
        </DockPanel>
    </dxb:BarManager>
</dxr:DXRibbonWindow>
